# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=ibus-typing-booster
pkgver=1.5.32
pkgrel=1
pkgdesc="Predictive input method for the IBus platform"
url="https://mike-fabian.github.io/ibus-typing-booster/"
arch=(any)
license=(GPL3)
depends=(ibus python-gobject python-dbus python-pyenchant m17n-lib sqlite)
makedepends=(git m17n-db hunspell hunspell-{de,el,en,es,fr,he,hu,it,nl,pl,ro})
_commit=b9930d61d3dc2cb5b3e1764b69342ce1d37a0aad  # master
source=("git+https://github.com/mike-fabian/ibus-typing-booster#commit=$_commit")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  autoreconf -fvi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --libexec=/usr/lib/ibus
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install

  cd "$pkgdir/usr/share/$pkgname/data"
  gzip --force --best *.{txt,json} annotations{,Derived}/*.xml
}
